<!doctype html>
<html><head>
	<meta charset="utf-8">
	<title>列表页</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">

	<!-- jQuery-->
	<script type="text/javascript" src="/static/plugins/jquery/jquery-3.6.0.min.js"></script>

	<!-- layui-->
	<link rel="stylesheet" href="/static/plugins/layui/2.7.6/css/layui.css" media="all">
	<script src="/static/plugins/layui/2.7.6/layui.js" charset="utf-8"></script>

	<!-- common -->
	<link rel="stylesheet" href="/static/admin/css/common.css" media="all" />
	<script type="text/javascript" src="/static/admin/js/common-grid.js"></script>
	<link rel="stylesheet" href="/static/admin/css/mini-ease.css" media="all" />

	<!-- iconfont -->
	<link rel="stylesheet" href="/static/css/icon/iconfont.css" media="all" />

</head>
<body style="padding: 10px 0 0 10px;">

<input name="operateCompanyId" id="operateCompanyId" type="hidden" th:value="${dto.operateCompanyId}">
<div class="layui-row layui-col-space5" style="width:100%;">
	<!-- 左边面板【start】 -->
	<div class="layui-col-md10" id="id_panel_left_grid" style="width:100%;">
		<div class="layui-panel" style="overflow: auto; padding-top: 0.2rem;">
			<div class="mid-content">

				<table class="layui-hide" id="main_table" lay-filter="main_table"></table>


				<script type="text/html" id="templet_index_no">
					{{d.LAY_TABLE_INDEX+1}}
				</script>

				<script type="text/html" id="templet_script_name">
					{{d.info}}
				</script>

				<script th:inline="javascript">


					layui
							.use(['form', 'element', 'table', 'util', 'laydate'], function(){
								var element = layui.element;
								var table = layui.table;
								var form = layui.form;
								var util = layui.util;
								var $ = layui.jquery;
								var laydate = layui.laydate;
								var laypage = layui.laypage;


								// 创建渲染实例
								table.render({
									elem: '#main_table'
									,url:'/api/inter/tpShopRegisterPhaseRecord/getDeatilByCompanyId' //接口
									,toolbar: '#toolbarDemo'
									,defaultToolbar: [{
										title: '刷新页面'
										,layEvent: 'LAYTABLE_REFRESH'
										,icon: 'layui-icon-refresh'
									}]

									,height: window.innerHeight - 40 // 最大高度减去其他容器已占有的高度差
									,limit : 20
									,limits : [20,50,500,9999]
									,where: {
										"operateCompanyId":$('#operateCompanyId').val(),
										//"OperateCompanyId":$('#operateCompanyId').val(),
									}
									,cellMinWidth: 95
									,totalRow: true // 开启合计行
									,page: true
									/*
									,request: {
										pageName: 'page',
										limitName: 'size'
									}
									 */
									,skin: 'row'
									,even: true // 开启隔行背景
									//,cols: col
									,cols:[

										[
											{title: '公司简称', field:'vGsJc', align:"center"},
											{title: '运营公司', field:'vGsMc', align:"center"},
											{title: '运营公司编码', field:'vGsBm', align:"center"},
											{title: '店铺名', field:'shopName', align:"center"},
											{title: '完成顺序', field:'endSort', align:"center"},
											{title: '阶段顺序', field:'phaseNum', align:"center"},
											{title: '阶段名称', field:'thePhaseName', align:"center"},
											{title: '时效', field:'workTimeInfo', align:"center"},
											{title: '负责部门', field:'deptName', align:"center"},
											{title: '负责人', field:'headUser', align:"center"},
											{title: '工作内容', field:'workContent', align:"center"},
											{title: '开始时间', field:'startTime', align:"center"},
											{title: '预计完成时间', field:'planEndTimeInfo', align:"center"},
											{title: '实际完成时间', field:'realityEndTime', align:"center"},
											{title: '工作时间', field:'realityWorkTime', align:"center"},
											{title: '超时时间', field:'overTime', align:"center"},
											{title: '是否超时', field:'isOver', align:"center"},
											{title: '运营人', field:'operateUser', align:"center"},
											{title: '运营部门', field:'vYyJb', align:"center"},
											{title: '运营人上级', field:'pOperateUser', align:"center"},
											{title: '运营部门上级', field:'pVYyJb', align:"center"},
										]
									]



									,done: function(res){
										var id = this.id;

										// 绑定选择框(转换)的值变化提交事件
										form.on('switch(_input_filter_checkbox_on_table)', function(data){
											//layer.tips(this.value + ' ' + this.name + '：'+ data.elem.checked, data.othis);
											var value = this.checked ? 1 : 0;
											modifyTableCacheBySwitch(data, value);
										});

										// 绑定查询按钮--表格重载成功后
										$('#id_filter_form_search').on('click', function(e){
											layui.table.reload("main_table",{
												page: {
													curr: 1
												},
												where: getConds()
											})
										});
									}
									,error: function(res, msg){
										console.log(res, msg)
									}
								});

								var indexSearchForm = 0;
								// 工具栏事件
								table.on('toolbar(main_table)', function(obj){
									var id = obj.config.id;
									var checkStatus = table.checkStatus(id);
									var othis = lay(this);
									switch(obj.event){
										case 'LAYTABLE_REFRESH':
										{
											layer.confirm("确定刷新吗？",{
												btn: ['确定', '取消']
											}, function (index) {
												location.reload();
												layer.close(index);
											});
											break;
										}
									};
								});



								//触发表格复选框选择
								table.on('checkbox(main_table)', function(obj){
									console.log(obj)
								});

								//触发表格单选框选择
								table.on('radio(main_table)', function(obj){
									console.log(obj)
								});

							});

					//
					$('body').on("mouseenter",".layui-table-body tr",function () {
						$(this).siblings().find("div").css("color","#142A48");
						$(this).find("div").css("color","#4DA1FF");
					})
				</script>
			</div>
		</div>
	</div>
	<!-- 左边面板【end】 -->


</div>

<script type="text/javascript">
	// 设置高度
	$(function() {
		$('#id_panel_left_grid').css('height', (window.innerHeight - 40) + 'px');
	});
</script>
</body>

</html>